//
//  RWColor.h
//  Chat
//
//  Created by 任伟 on 16/3/7.
//  Copyright © 2016年 任伟. All rights reserved.
//

#ifndef RWColor_h
#define RWColor_h


#define WHITECOLOR [UIColor whiteColor]
#define GREYCOLOR [UIColor grayColor]
#define BLACKCOLOR [UIColor blackColor]

#define RGBCOLOR(r,g,b)         [UIColor colorWithRed:(r)/255.0f green:(g)/255.0f blue:(b)/255.0f alpha:1]
#define RGBACOLOR(r,g,b,a)      [UIColor colorWithRed:(r)/255.0f green:(g)/255.0f blue:(b)/255.0f alpha:(a)]
#define RGBBLUE                  RGBCOLOR(50, 194, 247)
#define HSVCOLOR(h,s,v)         [UIColor colorWithHue:(h) saturation:(s) value:(v) alpha:1]
#define HSVACOLOR(h,s,v,a)      [UIColor colorWithHue:(h) saturation:(s) value:(v) alpha:(a)]

#define RGBA(r,g,b,a)           (r)/255.0f, (g)/255.0f, (b)/255.0f, (a)





#define VIEW_BACKGROUND_COLOR           str2rgb(@"#f5f5f5")
#define VIEW_BACKGROUND_COLOR_BLUE      str2rgb(@"#1ba8ed")
#define VIEW_BACKGROUND_COLOR_GRAY      str2rgb(@"#e5e5e5")
#define VIEW_BACKGROUND_COLOR_LOGIN_TIP str2rgb(@"#949494")


#define TEXT_BLACK_COLOR                str2rgb(@"#555555")
#define TEXT_BLACK_COLOR_LOGIN          str2rgb(@"#555555")
#define TEXT_BLACK_DEVICE_CONTROL_COLOR str2rgb(@"#434343")




#define TEXT_GRAY_COLOR                         str2rgb(@"#999999")
#define TEXT_GRAY_BLACK_ALERT_TITLE_COLOR       str2rgb(@"#353535")
#define TEXT_GRAY_ALERT_BUTTON_COLOR            str2rgb(@"#3c3c3c7")
#define TEXT_GRAY_DEVICE_CONTROL_COLOR          str2rgb(@"#878787")


#define TEXT_BLUE_COLOR                 str2rgb(@"#1ba8ed")
#define TEXT_DARK_BLUE_COLOR            str2rgb(@"#b5b5b6")

#define LINE_GRAY_COLOR                 str2rgb(@"#e0e0e0")
#define LINE_GRAY_COLOR_REGISTER        str2rgb(@"#dadada")
#define LINE_NAVIGATION_BAR             str2rgb(@"#e2e2e2")
#define LINE_GRAY_GRAPH_COLOR           str2rgb(@"#bebebe4")





#define COLORONLINE              [UIColor colorWithRed:34 / 255.0f green:118 / 255.0f blue:181 / 255.0f alpha:1]
#define COLOROFFLINE             [UIColor colorWithRed:167 / 255.0f green:167 / 255.0f blue:167 / 255.0f alpha:1]

#define FONTSYSTEM(f)            [UIFont systemFontOfSize:f]
#define FONTBOLD(f)              [UIFont boldSystemFontOfSize:f]

#define kGetStringHeight(str,font,width) ([str boundingRectWithSize:CGSizeMake(width,2000) options:NSStringDrawingUsesLineFragmentOrigin attributes:@{NSFontAttributeName:font} context:nil].size.height)

#define kGetStringSize(str,font,width) ([str boundingRectWithSize:CGSizeMake(width,2000) options:NSStringDrawingUsesLineFragmentOrigin attributes:@{NSFontAttributeName:font} context:nil].size)

#define kGetStringWidth(str,font,maxWidth,height) ([str boundingRectWithSize:CGSizeMake(maxWidth,height) options:NSStringDrawingUsesLineFragmentOrigin attributes:@{NSFontAttributeName:font} context:nil].size.width)


#define COLOR_BACK_BLUE                [UIColor colorWithRed:49 / 255.0f green:175 / 255.0f blue:254 / 255.0f alpha:1]
#define COLOR_BACKGROUND               [UIColor colorWithRed:235 / 255.0f green:235 / 255.0f blue:235 / 255.0f alpha:1]
#define COLOR_BACK                     [UIColor colorWithRed:209 / 255.0f green:209 / 255.0f blue:209 / 255.0f alpha:1]
#define COLOR_TEXT                     [UIColor colorWithRed:150 / 255.0f green:150 / 255.0f blue:150 / 255.0f alpha:1]
#define COLOR_BORDER                   [UIColor colorWithRed:211 / 255.0f green:211 / 255.0f blue:211 / 255.0f alpha:1]
#define COLOR_TEXT_DARK                [UIColor colorWithRed:135 / 255.0f green:135 / 255.0f blue:135 / 255.0f alpha:1]



#endif /* RWColor_h */
